Integrand size = 19, antiderivative size = 72 \[ \int \cot ^3(c+d x) (a+b \sec (c+d x)) \, dx=-\frac {(2 a+b) \log (1-\cos (c+d x))}{4 d}-\frac {(2 a-b) \log (1+\cos (c+d x))}{4 d}-\frac {\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3967, 3968, 2747, 647, 31} \[ \int \cot ^3(c+d x) (a+b \sec (c+d x)) \, dx=-\frac {(2 a+b) \log (1-\cos (c+d x))}{4 d}-\frac {(2 a-b) \log (\cos (c+d x)+1)}{4 d}-\frac {\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d} \]
[In]
[Out]
Rule 31
Rule 647
Rule 2747
Rule 3967
Rule 3968
Rubi steps \begin{align*} \text {integral}& = -\frac {\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d}+\frac {1}{2} \int \cot (c+d x) (-2 a-b \sec (c+d x)) \, dx \\ & = -\frac {\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d}+\frac {1}{2} \int (-b-2 a \cos (c+d x)) \csc (c+d x) \, dx \\ & = -\frac {\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d}+\frac {a \text {Subst}\left (\int \frac {-b+x}{4 a^2-x^2} \, dx,x,-2 a \cos (c+d x)\right )}{d} \\ & = -\frac {\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d}+\frac {(2 a-b) \text {Subst}\left (\int \frac {1}{2 a-x} \, dx,x,-2 a \cos (c+d x)\right )}{4 d}+\frac {(2 a+b) \text {Subst}\left (\int \frac {1}{-2 a-x} \, dx,x,-2 a \cos (c+d x)\right )}{4 d} \\ & = -\frac {(2 a+b) \log (1-\cos (c+d x))}{4 d}-\frac {(2 a-b) \log (1+\cos (c+d x))}{4 d}-\frac {\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d} \\ \end{align*}
Time = 0.79 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.58 \[ \int \cot ^3(c+d x) (a+b \sec (c+d x)) \, dx=-\frac {b \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {a \left (\cot ^2(c+d x)+2 \log (\cos (c+d x))+2 \log (\tan (c+d x))\right )}{2 d}+\frac {b \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d} \]
[In]
[Out]
Time = 0.55 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.04
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+b \left (-\frac {\cos \left (d x +c \right )^{3}}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{2}-\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )}{d}\) | \(75\) |
default | \(\frac {a \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+b \left (-\frac {\cos \left (d x +c \right )^{3}}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{2}-\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )}{d}\) | \(75\) |
risch | \(i a x +\frac {2 i a c}{d}+\frac {b \,{\mathrm e}^{3 i \left (d x +c \right )}+2 a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b}{2 d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b}{2 d}\) | \(139\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.38 \[ \int \cot ^3(c+d x) (a+b \sec (c+d x)) \, dx=\frac {2 \, b \cos \left (d x + c\right ) - {\left ({\left (2 \, a - b\right )} \cos \left (d x + c\right )^{2} - 2 \, a + b\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - 2 \, a - b\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, a}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]
[In]
[Out]
\[ \int \cot ^3(c+d x) (a+b \sec (c+d x)) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right ) \cot ^{3}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.86 \[ \int \cot ^3(c+d x) (a+b \sec (c+d x)) \, dx=-\frac {{\left (2 \, a - b\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) + {\left (2 \, a + b\right )} \log \left (\cos \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (b \cos \left (d x + c\right ) + a\right )}}{\cos \left (d x + c\right )^{2} - 1}}{4 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 170 vs. \(2 (66) = 132\).
Time = 0.30 (sec) , antiderivative size = 170, normalized size of antiderivative = 2.36 \[ \int \cot ^3(c+d x) (a+b \sec (c+d x)) \, dx=-\frac {2 \, {\left (2 \, a + b\right )} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 8 \, a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - \frac {{\left (a + b + \frac {4 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {2 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}{\cos \left (d x + c\right ) - 1} - \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}}{8 \, d} \]
[In]
[Out]
Time = 14.47 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.19 \[ \int \cot ^3(c+d x) (a+b \sec (c+d x)) \, dx=\frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {a}{8}-\frac {b}{8}\right )}{d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {a}{8}+\frac {b}{8}\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a+\frac {b}{2}\right )}{d} \]
[In]
[Out]